/**
 * Created by lijing on 2016-07-11.
 */
function showWorkflow(self,item,id,modelName){
    var d = dialog({
        title: '审核',
        content:"<textarea id='idComment' class='form-control' rows='5'></textarea>",
        okValue:"同意",
        cancelValue:"驳回",
        ok:function(){
            approveWork.call(self,id,"4",modelName,encodeURIComponent(document.getElementById("idComment").value));
        },
        cancel:function(){
            approveWork.call(self,id,"5",modelName,encodeURIComponent(document.getElementById("idComment").value));
        }
    });

    d.showModal(item);
}
function approveWork(id,flag,modelName,content){
    var self=this;
    var url=G_Path.path+"/sys/workflow/approve/"+id+"/"+flag+"?modelName="+modelName+"&"+"content="+content;
    $.get(url,function(text){
        self.get();
    })
}
